android: Use activity Window surface for UI rendering - #11538
Conversation
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
abfea0c to
c37b117
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors ContentViewRenderView to support rendering directly to the Activity's Window surface via a new WindowSurfaceBridge strategy, alongside the default child SurfaceView rendering path (SurfaceViewBridge). An abstract SurfaceBridge class is introduced to encapsulate these strategies. The feedback highlights a potential NullPointerException in WindowSurfaceBridge.connect() where windowAndroid.getActivity() is dereferenced without a null check.
Introduces support for rendering UI directly into the Activity's Window surface via Window.takeSurface(), as an alternative to an embedded child SurfaceView. This behavior is abstracted behind WindowSurfaceBridge and is controlled by the `--use-window-surface-for-ui` command-line flag (disabled by default). Issue: 494590075
c37b117 to
0e66bb7
Compare
jasonzhangxx
left a comment
There was a problem hiding this comment.
The change overall looks good to me, but we need @johnxwork for a final review.
|
nit: title should be |
| new CobaltA11yHelper(this, mShellManager.getContentViewRenderView().getSurfaceView()); | ||
|
|
||
| maybeRegisterNetworkRecoveryObserver(); | ||
| new CobaltA11yHelper(this, mShellManager.getContentViewRenderView().getAnchorView()); |
There was a problem hiding this comment.
We should check if this breaks a11y.
There was a problem hiding this comment.
IIUC, this does not break a11y and on local test, I could not see the regressions.
Will double-check with QA.
There was a problem hiding this comment.
Filed https://b.corp.google.com/issues/540389275 for a11y testing
Done |
jasonzhangxx
left a comment
There was a problem hiding this comment.
LGTM, @johnxwork for final review.
Introduces support for rendering UI directly into the Activity's Window surface via Window.takeSurface(), as an alternative to an embedded child SurfaceView.
This behavior is abstracted behind WindowSurfaceBridge and is controlled by the
--use-window-surface-for-uicommand-line flag (disabled by default).Issue: 494590075